/*
 * @Descripttion: 
 * @version: @ 1.0.0
 * @Author: 朱江洲
 * @Date: 2022-02-24 13:06:45
 * @LastEditors: 朱江洲
 * @LastEditTime: 2022-04-26 10:13:03
 */
import request from "@/utils/request.js";


// 合同列表
export const contactList = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/contract/list',
        params
    })
}
// - 客户列表

export const selectCustomerList = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/contact/selectCustomerList',
        params
    })
}

// - 商机列表

export const listByCustomer = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/opportunity/listByCustomer',
        params
    })
}

// - 客户签约人列表
export const ByCustomer = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/contact/listByCustomer',
        params
    })
}

// - 新增合同
export const insert = data => {
    return request({
        method: 'post',
        url: '/serviceProvide/contract/insert',
        data
    })
}
// - 更新合同
export const updateInsert = data => {
    return request({
        method: 'post',
        url: '/serviceProvide/contract/update',
        data
    })
}

// 审核人
export const getNoRepeatPersonLiable = data => {
    return request({
        method: 'post',
        url: 'serviceProvide/distribution/getNoRepeatPersonLiable',
        data
    })
}
// 合同删除
export const del = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/contract/delete',
        params
    })
}
// - 审批流程

export const auditProcess = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/contract/auditProcess',
        params
    })
}

// 撤回
export const withdraw = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/contract/withdraw',
        params
    })
}

// 审批
export const audit = data => {
    return request({
        method: 'post',
        url: '/serviceProvide/contract/audit',
        data
    })
}

// 作废
export const annulled = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/contract/annulled',
        params
    })
}

// 导出
export const exportExl = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/contract/export',
        params
    })
}
// - 更换负责人

export const changeDirector = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/contract/changeDirector',
        params
    })
}

// 是否有撤回
export const oneself = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/contract/oneself',
        params
    })
}
// 合同尾款计划
export const contractFooter = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/contract/footer',
        params
    })
}

// 是否能同意拒绝
export const canAudit = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/contract/canAudit',
        params
    })
}

// 保存为草稿
export const insertDraft = data => {
    return request({
        method: 'post',
        url: '/serviceProvide/contract/insertDraft',
        data
    })
}
